<template>
  <view class="tab-component">
    <view class="bottom-tab-box">
      <view
        class="left-tab-item"
        v-for="(item, index) in menuList"
        :key="index"
      >
        <view class="left-content">
          <text class="title">{{ item.title }}</text>
          <text class="des">{{ item.des }}</text>
        </view>
        <view class="right-content">
          <text class="iconfont icon-weibiaoti--10"></text>
        </view>
        <!-- index单数显示 -->
        <view class="line" v-if="index % 2 == 0"></view>
      </view>
    </view>
  </view>
</template>

<script>
import { defineComponent, reactive, toRefs } from "vue";
export default defineComponent({
  name: "",
  props: {},
  components: {},
  setup() {
    const data = reactive({
      menuList: [
        { des: "生活补贴轻松赚", title: "申请成为个人商家" },
        { des: "企业商家0元入驻", title: "企业/品牌商家入驻" },
        { des: "", title: "想看" },
        { des: "", title: "抢票预约" },
      ],
    });
    return {
      ...toRefs(data),
    };
  },
});
</script>

<style scoped lang="less">
.tab-component {
  display: flex;
  flex-direction: column;
  // padding: 20rpx 0;
  background: #eee;
  border-radius: 6rpx;
  .bottom-tab-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    // grid-template-rows: repeat(2, 100rpx);
    column-gap: 0px;
    row-gap: 10px;
    width: 100%;
    .left-tab-item {
      display: flex;
      background: #fff;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
      padding: 20rpx 30rpx;
      box-sizing: border-box;
      position: relative;
      .line {
        position: absolute;
        width: 2rpx;
        height: 40rpx;
        background: #ddd;
        right: 0;
      }
      .left-content {
        display: flex;
        flex-direction: column;
        justify-content: center;

        .des {
          font-size: 20rpx;
          color: #777;
          margin-right: 12rpx;
        }
        .title {
          font-size: 26rpx;
        }
      }
      .right-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        .icon-weibiaoti--10 {
          font-size: 20rpx;
          display: block;
          transform: rotate(180deg);
        }
      }
    }
  }
}
</style>
